package com.employ.job.service.impl;

import java.util.List;
import com.employ.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.employ.job.mapper.EmpMessagesMapper;
import com.employ.job.domain.EmpMessages;
import com.employ.job.service.IEmpMessagesService;

/**
 * 消息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-24
 */
@Service
public class EmpMessagesServiceImpl implements IEmpMessagesService 
{
    @Autowired
    private EmpMessagesMapper empMessagesMapper;

    /**
     * 查询消息
     * 
     * @param id 消息主键
     * @return 消息
     */
    @Override
    public EmpMessages selectEmpMessagesById(Long id)
    {
        return empMessagesMapper.selectEmpMessagesById(id);
    }

    /**
     * 查询消息列表
     * 
     * @param empMessages 消息
     * @return 消息
     */
    @Override
    public List<EmpMessages> selectEmpMessagesList(EmpMessages empMessages)
    {
        return empMessagesMapper.selectEmpMessagesList(empMessages);
    }

    /**
     * 新增消息
     * 
     * @param empMessages 消息
     * @return 结果
     */
    @Override
    public int insertEmpMessages(EmpMessages empMessages)
    {
        empMessages.setCreateTime(DateUtils.getNowDate());
        return empMessagesMapper.insertEmpMessages(empMessages);
    }

    /**
     * 修改消息
     * 
     * @param empMessages 消息
     * @return 结果
     */
    @Override
    public int updateEmpMessages(EmpMessages empMessages)
    {
        empMessages.setUpdateTime(DateUtils.getNowDate());
        return empMessagesMapper.updateEmpMessages(empMessages);
    }

    /**
     * 批量删除消息
     * 
     * @param ids 需要删除的消息主键
     * @return 结果
     */
    @Override
    public int deleteEmpMessagesByIds(Long[] ids)
    {
        return empMessagesMapper.deleteEmpMessagesByIds(ids);
    }

    /**
     * 删除消息信息
     * 
     * @param id 消息主键
     * @return 结果
     */
    @Override
    public int deleteEmpMessagesById(Long id)
    {
        return empMessagesMapper.deleteEmpMessagesById(id);
    }
}
